//
//  LSReadTestView.h
//  听说弱点强化训练
//
//  Created by 盛超 on 2018/10/31.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LSModelQues.h"
#import "BKAudioPlayer.h"
#import "LSBaseQuesView.h"

@class LSReadTestView;
@protocol LSReadTestViewDelegate <NSObject>

- (void)LSReadTest:(LSReadTestView*)testView RecordingTime:(CGFloat)time TotalTime:(NSInteger)totalTime;//正在录音

- (void)LSReadTestViewEnd;//流程结束

- (void)LSReadReAnswer;//重做

- (void)LSReadNext;//下一题

- (void)LSReadTestReslut:(NSDictionary*)reslutDict;//提交传值

- (void)LSReadShowWrongComplteView;//展示错题重做的弹窗

- (void)LSReadSepSenStauts:(BOOL)isSep;//分句

- (void)LSReadShowZSD:(NSString *)testString;

- (void)LSSenReadTest:(LSReadTestView*)testView SenRecordingTime:(CGFloat)time SenTotalTime:(NSInteger)totalTime;//正在录音

- (void)LSReadTest:(LSReadTestView*)testView PauseType:(LSQuesPauseType)pauseType;

@end

@interface LSReadTestView : UIView<BKAudioPlayerDelegate>

/*
 试题数据(其中包含时间数据)
 */
@property (nonatomic,strong) LSModelQues *model;
/*
 听说资源库，A00数字化资源库
 */
@property (nonatomic,copy) NSString *from;
/**
 关卡/速度等级
 */
@property (nonatomic,assign) NSInteger speedLayer;

@property (nonatomic,assign) id<LSReadTestViewDelegate>delegate;

@property (nonatomic,assign) BOOL isReAnswer;//是否重新作答过

@property (nonatomic,assign) LSQuesPauseType pauseType;//暂停状态

@property (nonatomic,strong) LSSoundPlayer *soundPlayer;


/**
 在界面后，释放资源：定时器，音频播放器，录音器
 */

//开始
- (void)start;
//直接进入第二步
- (void)startSecond;
//显示重新作答，下一题
- (void)showNextAndReAnswer;
//暂停
- (void)pause;
//恢复
- (void)resume;
//结束
- (void)stop;
//取消录音，原音播放
- (void)cancelRecordPlay;
//进行分句评测
- (void)startSenTest:(NSString*)text;

//展示查看时播放器
- (void)showPlayerVoice;

//重新开始
- (void)reStartSpeedLayer:(NSInteger)speedLayer;

@end
